#include <common.h>
#include <ast/ast.h>

namespace ast {

  NodeFuncDef::NodeFuncDef(Stage _stage): stage(_stage) {}

  void NodeFuncDef::dot_string(std::string & str) {
    str = "FuncDef";
    str += R"(\n)";
    str += std::string("iden:") + this->iden;
    str += R"(\n)";
    str += std::string("stage:")
      + std::string(magic_enum::enum_name(this->stage));
  }

  void NodeFuncDef::dot_accept(AstDot & ast_dot) {
    ast_dot.visit(*this);
  }
  
  void NodeFuncDef::accept(ir::Visitor & visitor) {
    visitor.visit(*this);
  }
}
